package com.seal.commons.config.apollo.configuration;

import com.seal.commons.config.apollo.locator.ApolloPropertySourceLocator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * ClassName:ApolloConfigConfiguration <br/>
 * Date:     2019-05-17 13:53 <br/>
 *
 * @author yong.huang
 * @see
 * @since JDK 1.8
 */
@Configuration
@EnableConfigurationProperties(ApolloProperties.class)
public class ApolloConfigConfiguration  {

    @Autowired
    private ApolloProperties apolloProperties;

    @Bean
    public ApolloPropertySourceLocator apolloPropertySourceLocator() {
        return new ApolloPropertySourceLocator(apolloProperties);
    }

}
